<?php
include 'moduleControl.php';
$type = $_GET['type'];
$mc = new Module_Control();
if ($type=='findDepartMent'){
    echo json_encode($mc->findDepartMent());
}else if($type=='findMajorByDeptId'){
    $deptId = $_GET['deptId'];
    echo json_encode($mc->findMajorByDeptId($deptId));
}else if($type=='findClassByMarjorId'){
    $marjorId = $_GET['marjorId'];
    echo json_encode($mc->findClassByMarjorId($marjorId));
}else if($type=='findStudentInfoByClassId'){
    $classId = $_GET['classId'];
    echo json_encode($mc->findStudentInfoByClassId($classId));
}
else if($type=='save'){
    $xbdm = $_GET['xbdm'];
    $xbmc = $_GET['xbmc'];
    $zydm = $_GET['zydm'];
    $zymc = $_GET['zymc'];
    $bjdm = $_GET['bjdm'];
    $bjmc = $_GET['bjmc'];
    $ydrs = $_GET['ydrs'];
    $sdrs = $_GET['sdrs'];
    $qxqk = $_GET['qxqk'];
    echo json_encode($mc->save($xbdm,$xbmc,$zydm,$zymc,$bjdm,$bjmc,$ydrs,$sdrs,$qxqk));
}else if($type=='yxcqByYear'){
    echo json_encode($mc->yxcqByYear());
}else if($type=='zycqByYear'){
    echo json_encode($mc->zycqByYear());
}
?>